package com.djx.ack.mqconfig;

import org.springframework.amqp.core.*;
import org.springframework.beans.factory.annotation.*;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

/**
 * @ClassName MQExchange
 * @Date 2021-07-29 17:08
 * @Author Administrator
 * @Description TODO
 * Version 1.0
 */
@Configuration
public class MQExchange
{

    @org.springframework.context.annotation.Bean
    public DirectExchange directExchange() {
        return new DirectExchange("ACK_EXCHANGE", true, false);
    }

    @org.springframework.context.annotation.Bean
    public Queue tradingCenterQueue() {
        return new Queue("ACK_ONE_QUEUE", true, false, false);
    }

    @org.springframework.context.annotation.Bean
    public Binding popUpPromptBinding() {
        return BindingBuilder.bind(tradingCenterQueue()).to(directExchange()).with("ackA");
    }
}
